package br.trainee.web.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@IdClass(ClinicaTelefoneClinicaVOPK.class)
@Table(name="clinica_telefone_clinica")
@NamedQueries(value={
		
		@NamedQuery(name="queryBuscarTelefonePorIdClinica", query="select ct from ClinicaTelefoneClinicaVO ct where ct.clinica.idPessoa =:idClinica and ct.telefone.status.tipoStatus =:tipoStatus")
})
public class ClinicaTelefoneClinicaVO {
	
	@Id
	@JoinColumn(name="id_clinica",referencedColumnName="id_clinica")
	@ManyToOne(fetch=FetchType.EAGER)
	private ClinicaVO clinica;
	
	@Id
	@JoinColumn(name="id_telefone_clinica",referencedColumnName="id_telefone_clinica")
	@ManyToOne(fetch=FetchType.EAGER)
	private TelefoneClinicaVO telefone;
	
	@Column(name="operadora")
	private String operadora;

	
	public ClinicaVO getClinica() {
		return clinica;
	}
	public void setClinica(ClinicaVO clinica) {
		this.clinica = clinica;
	}

	public TelefoneClinicaVO getTelefone() {
		return telefone;
	}
	public void setTelefone(TelefoneClinicaVO telefone) {
		this.telefone = telefone;
	}

	public String getOperadora() {
		return operadora;
	}
	public void setOperadora(String operadora) {
		this.operadora = operadora;
	}
	
	
	

}
